using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Security.Cryptography;
using PlugNT.Safe;
using PlugNT.Custom;
using PlugNT.Cms.Model;
//5^1^a^s^p^x
namespace PlugNT.Cms.BLL
{
    public class Field
    {

        private static readonly PlugNT.Cms.DAL.Field dal = new PlugNT.Cms.DAL.Field();







        public FieldInfo GetFieldInfo(int id)
        {
            return dal.GetFieldInfo(id);
        }







        public bool Add(FieldInfo model)
        {
            return dal.Add(model);
        }






        public bool Update(FieldInfo model)
        {
            return dal.Update(model);
        }







        public bool Delete(int id)
        {
            return dal.Delete(id);
        }







        public DataTable GetList(string  postfix)
        {
            postfix = postfix.Trim();
            string andWhere = (postfix == "") ? "" : " and [tabpostfix]='" + StringHelper.SqlFilter(postfix) + "'";
            return dal.GetList(andWhere);
        }





        public DataTable GetBindList()
        {
            return dal.GetBindList();
        }







        public DataTable GetBindList(string  postfix)
        {
            return dal.GetBindList(StringHelper.SqlFilter(postfix));
        }






        public int GetCount(string  postfix)
        {
            string andWhere = (postfix=="") ? "" : " and [tabpostfix]='" + StringHelper.SqlFilter(postfix) + "'";
            return dal.GetCount(andWhere);
        }







        public bool Exists(string columnname, string  postfix)
        {
            return dal.Exists(columnname.Trim(), StringHelper.SqlFilter(postfix));
        }


        

        public string Help()
        {
            return @"mailto:354990393@qq.com";
        }


    }
}
